package com.hyphenate.chatuidemo.bean;

import android.os.Parcel;
import android.os.Parcelable;

import java.util.List;

/**
 * author： ccm
 * time： 2017/6/21.
 * description：
 */

public class AccompentCityBean implements Parcelable {

    /**
     * code : 2000
     * data : [{"name":"北京市","id":"110100"},{"name":"上海市","id":"310100"},{"name":"广州市","id":"440100"},{"name":"深圳市","id":"440300"},{"name":"武汉市","id":"420100"},{"name":"十堰市","id":"420300"},{"name":"宜昌市","id":"420500"},{"name":"锡林郭勒盟","id":"152500"},{"name":"佳木斯市","id":"230800"},{"name":"锦州市","id":"210700"},{"name":"呼伦贝尔市","id":"150700"},{"name":"重庆市","id":"500100"},{"name":"银川市","id":"640100"},{"name":"阿克苏地区","id":"652900"},{"name":"南宁市","id":"450100"},{"name":"拉萨市","id":"540100"},{"name":"石家庄市","id":"130100"},{"name":"太原市","id":"140100"},{"name":"杭州市","id":"330100"},{"name":"兰州市","id":"620100"},{"name":"贵阳市","id":"520100"},{"name":"南平市","id":"350700"},{"name":"泉州市","id":"350500"},{"name":"福州市","id":"350100"}]
     * message : 请求成功
     */

    private String code;
    private String message;
    private List<DataBean> data;

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public List<DataBean> getData() {
        return data;
    }

    public void setData(List<DataBean> data) {
        this.data = data;
    }

    public static class DataBean implements Parcelable {
        /**
         * name : 北京市
         * id : 110100
         */

        private String name;
        private String id;

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.name);
            dest.writeString(this.id);
        }

        public DataBean() {
        }

        protected DataBean(Parcel in) {
            this.name = in.readString();
            this.id = in.readString();
        }

        public static final Parcelable.Creator<DataBean> CREATOR = new Parcelable.Creator<DataBean>() {
            @Override
            public DataBean createFromParcel(Parcel source) {
                return new DataBean(source);
            }

            @Override
            public DataBean[] newArray(int size) {
                return new DataBean[size];
            }
        };
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.code);
        dest.writeString(this.message);
        dest.writeTypedList(this.data);
    }

    public AccompentCityBean() {
    }

    protected AccompentCityBean(Parcel in) {
        this.code = in.readString();
        this.message = in.readString();
        this.data = in.createTypedArrayList(DataBean.CREATOR);
    }

    public static final Parcelable.Creator<AccompentCityBean> CREATOR = new Parcelable.Creator<AccompentCityBean>() {
        @Override
        public AccompentCityBean createFromParcel(Parcel source) {
            return new AccompentCityBean(source);
        }

        @Override
        public AccompentCityBean[] newArray(int size) {
            return new AccompentCityBean[size];
        }
    };
}
